package com.example.rk.service.impl;

import com.example.rk.entity.WordCount;
import com.example.rk.mapper.WordCountMapper;
import com.example.rk.service.WordCountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;

@Service
public class WordCountServiceImpl implements WordCountService {
    @Autowired
    private WordCountMapper wordCountMapper;


    @Override
    public List<WordCount> count1() {
        return wordCountMapper.getcount1();
    }

    @Override
    public List<WordCount> count2() {
        return wordCountMapper.getcount2();
    }

    @Override
    public List<WordCount> count3() {
        return wordCountMapper.getcount3();
    }

    @Override
    public List<WordCount> count4() {
        return wordCountMapper.getcount4();
    }

    @Override
    public String flume1() {
        wordCountMapper.del0();
        wordCountMapper.del1();
        wordCountMapper.del2();
        wordCountMapper.del3();
        return "ok";
    }

    @Override
    public List<WordCount> count5() {
        return wordCountMapper.getcount5();
    }

//    @Override
//    public String flume() throws InterruptedException, IOException, ClassNotFoundException {
//        wordCountMapper.del0();
//        wordCountMapper.del1();
//        wordCountMapper.del2();
//        wordCountMapper.del3();
//        for(int i=0;i<4;i++){
//            WordCountDriver.DRiver(i); }
//        return "ok";
//    }
}


